/* Copyright ©, 2022, ECARX (Hubei) Technology Co., Ltd. All rights reserved.
 *
 * NOTICE: This file contains information which is confidential and proprietary to ECARX
 * (Hubei) Technology Co., Ltd. and/or other developers. No license to any intellectual
 * property rights contained within this file is either granted or implied except as may be
 * provided in an agreement with ECARX (Hubei) Technology Co., Ltd.
 *
 * Any unauthorized copying or distribution of content from this file in whole or in part
 * is prohibited.
 */
#ifndef ECARX_VHAL_CORE_PROPERTY_STORE_H
#define ECARX_VHAL_CORE_PROPERTY_STORE_H
#include <memory>

#include "vhal_core/property/PropertyDecalary.h"

namespace ecarx::vhal::core::property {
/**
  * @brief Get the Property Store object
  * 
  * @return std::vector<std::shared_ptr<Property>>& 
  */
std::vector<std::shared_ptr<Property>>& getPropertyStore();

}

#define REGISTER_PROPERTY(PROP_CLASS)                                                 \
    class PROP_CLASS##Register {                                                      \
      public:                                                                         \
        PROP_CLASS##Register() { getPropertyStore().emplace_back(new PROP_CLASS()); } \
    };                                                                                \
    static PROP_CLASS##Register PROP_CLASS##reg;
#endif